import request from "@/utils/request";

// 查询模板子表列表 (分页)
export function selectPageTemplateDetail(query) {
    return request({
        url: "/business/templateDetail/selectPage",
        method: "get",
        params: query,
    });
}

// 查询模板子表列表 (不分页)
export function listTemplateDetail(query) {
    return request({
        url: "/business/templateDetail/list",
        method: "get",
        params: query,
    });
}

// 删除 处方、检查、检验模板
export function delItemIdenticalGroup(query) {
    return request({
        url: "/business/templateDetail/delItemIdenticalGroup",
        method: "get",
        params: query,
    });
}

// 查询检查、检验、处方模板 (不分页)
export function getGroupApplyList(query) {
    return request({
        url: "/business/templateDetail/getGroupApplyList",
        method: "get",
        params: query,
    });
}

// 查询模板子表详细
export function getTemplateDetail(templateDetailId) {
    return request({
        url: "/business/templateDetail/" + templateDetailId,
        method: "get",
    });
}

// 新增模板子表
export function addTemplateDetail(data) {
    return request({
        url: "/business/templateDetail",
        method: "post",
        data: data,
    });
}

// 源自套装模板保存
export function insertBoByWholeSet(data) {
    return request({
        url: "/business/templateDetail/insertBoByWholeSet",
        method: "post",
        data: data,
    });
}

// 修改模板子表
export function updateTemplateDetail(data) {
    return request({
        url: "/business/templateDetail",
        method: "put",
        data: data,
    });
}

// 删除模板子表
export function delTemplateDetail(templateDetailId) {
    return request({
        url: "/business/templateDetail/" + templateDetailId,
        method: "delete",
    });
}
